platform :ios, '11.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Prevent Cocoapods from collecting stats, which adds time to each pod installation
ENV['COCOAPODS_DISABLE_STATS'] = 'true'


target 'Rainbow' do
  # Pods for Rainbow
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => ENV['USE_HERMES'] != 'NO'
  )

  # Rainbow's Internal Modules.
  pod 'Rainbow-Internals', :path => './Internals'

  pod 'FLAnimatedImage'
  pod 'libwebp'
  pod 'RNInputMask', :path => '../node_modules/react-native-text-input-mask/ios/InputMask'

  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID.podspec"

  pod "PanModal", :git => 'https://github.com/osdnk/PanModal', :commit => '42c1ac03b79d1333ff06c4234aba2e3e47a32c99'

  pod 'Shimmer'

  use_native_modules!
  if ENV['SKIP_FLIPPER'] != "true"
    use_flipper!()
  end

  post_install do |installer|
    react_native_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
    end
  end
end
